<div class="page dialog js_show">
    <div class="page__hd">
        <h1 class="page__title">Dialog</h1>
        <p class="page__desc">对话框</p>
        <a class="code_link" ng-click="showCode=!showCode">{{ showCode ? 'Hide Code' : 'Show Code' }}</a>
    </div>
    <div class="page__bd page__bd_spacing">
        <a href="javascript:;" class="weui-btn weui-btn_default" ng-click="openDialog1()">iOS Dialog样式一</a>
        <a href="javascript:;" class="weui-btn weui-btn_default" ng-click="openDialog2()">iOS Dialog样式二</a>
    </div>
    <div class="page__bd" style="padding: 0;">
        <blockquote ng-if="showCode">JavaScript</blockquote>
        <div hljs ng-if="showCode">
$scope.openDialog1 = function() {
    var hideDialog = $weuiDialog.open({
        className: 'className',
        title: '延迟3秒后自动关闭',
        text: '弹窗内容，告知当前状态、信息和解决方法，描述文字尽量控制在三行内',
        cancelText: '取消',
        cancel: function(){
            console.log('cancel')
        },
        confirmText: '确定',
        confirm: function(){
            console.log('confirm')
        }
    })

    $timeout(function() {
        hideDialog()
    }, 3000)
}

$scope.openDialog2 = function() {
    $weuiDialog.open({
        className: 'className',
        title: '弹窗标题',
        text: '弹窗内容，告知当前状态、信息和解决方法，描述文字尽量控制在三行内',
        cancelText: '',
        cancel: function(){
            console.log('cancel')
        },
        confirmText: '确定',
        confirm: function(){
            console.log('confirm')
        }
    })
}
        </div>
    </div>
    <div class="page__ft j_bottom">
        <a href="javascript:home()"><img src="images/icon_footer_link.png"></a>
    </div>
</div>